<?php
$pack=$_GET['pack'];
$project=$_GET['project'];
$dir=$_GET['dir'];


if(is_dir('../projects/'.$project)==true){
//echo "project exists";
}
else
{
echo "doesnt exist"; 
}
//echo "<br/>";
//echo '../projects/'.$project."/application/controller/".$pack;






//echo "<br/>";
if(is_file('../projects/'.$project."/application/controller/".$dir."/".$pack.".php")==true &&
        is_file('../projects/'.$project."/application/view/".$dir."/".$pack.".php")==true &&
        is_file('../projects/'.$project."/application/model/".$dir."/".$pack.".php")==true && 
        is_file('../projects/'.$project."/application/event_handler/".$dir."/".$pack.".php")==true){
//echo "package exists";
}
else
{
echo "doesnt exist"; 
}

$files=array();

$files["controller"]["name"]=$pack.".php";
$files["controller"]["path"]='../projects/'.$project."/application/controller/".$dir."/".$pack.".php";


$files["model"]["name"]=$pack.".php";
$files["model"]["path"]='../projects/'.$project."/application/model/".$dir."/".$pack.".php";

$files["view"]["name"]=$pack.".php";
$files["view"]["path"]='../projects/'.$project."/application/view/".$dir."/".$pack.".php";

$files["event_handler"]["name"]=$pack.".php";
$files["event_handler"]["path"]='../projects/'.$project."/application/event_handler/".$dir."/".$pack.".php";

$my_encoded=json_encode($files);

echo $my_encoded;